package org.wk.upms.domain;

import org.hibernate.annotations.GenericGenerator;
import org.wk.core.db.domain.BaseEntity;

import javax.persistence.*;

@Entity(name="org.wk.upms.domain.ResourceEntity")
@Table(name="s_security_resource")
public class ResourceEntity extends BaseEntity {
    /**
     * @Fields serialVersionUID: long
     * @Desc TODO:
     */
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id", unique = true, nullable = false, length = 32)
    @GeneratedValue(generator="system-uuid")
    @GenericGenerator(name="system-uuid",strategy = "uuid")
    private String id;

    @Column
    private String parentId;
    @Column
    private String parentName;

    @Column
    private String name;

    /**
     * 授权码 多个使用逗号分隔
     * 如：user:list,user:create
     */
    @Column
    private String perms;

    /**
     * 类型 目录 菜单 按钮
     */
    @Column
    private String typeCode;
    @Column
    private String typeName;
    @Column
    private String url;
    /**
     * 图标
     */
    @Column
    private String icon;

    @Column
    private int sortNo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getSortNo() {
        return sortNo;
    }

    public void setSortNo(int sortNo) {
        this.sortNo = sortNo;
    }
}
